            <?php
include "classes/db/dbmanager.php";
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$pDatabase = Database::getInstance();
$sql="SELECT * FROM users WHERE username='$myusername' and password='$mypassword'";
$result = $pDatabase->query($sql);
$count=mysql_num_rows($result);

if($count==1){

	session_start();
	$_SESSION['username'] = 'kalman';
	header("location:index.php");
}
else {
	echo "Wrong Username or Password";
}

?>
